import http from "./request.js"
export const login = (data) => http({
    url:`/api/user/login.do`,
    method: 'POST',
    params:data
})
export const home = () => http({
    url: `/api/statistic/base_count.do`,
    method: "get",
})
export const getUsers = (data)=>http({
    url:`/api/user/list.do`,
    method:'POST',
    params:data
})
export const getGoods = (data)=>http({
    url:`/api/product/list.do`,
    method:'get',
    params:data
 })
export const getOrder = (data)=>http({
    url:`/api/order/list.do`,
    method:'post',
    data
})
//
export const getSeach = (params)=>http({
    url:`/api/product/search.do`,
    method:'get',
    params
})
// 
export const GoodsDetail = (params)=>http({
    url:`/api/product/detail.do`,
    method:'get',
    params
})
//修改商品状态
export const GoodsStatus = (params)=>http({
    url:`/api/product/set_sale_status.do`,
    method:'get',
    params
})
//添加商品
export const GoodsAdd = (params)=>http({
    url:`/api/product/save.do`,
    method:'get',
    params
})
//获取品类子节点
export const getCategory = (params)=>http({
    url:`/api/category/get_category.do`,
    method:'get',
    params
})
// 
//修改品类名
export const setCateName = (params)=>http({
    url:`/api/category/set_category_name.do`,
    method:'get',
    params
})
// 
export const getSubtype = (params)=>http({
    url:`/api/category/get_deep_category.do`,
    method:'get',
    params
})
//添加品类
export const addCategory = (data) => http({
    url: `/api/category/add_category.do`,
    method: "post",
    params: data
})
//
export const orderSearch = (data) => http({
    url: `/api/order/search.do`,
    method: "post",
    params: data
})
// 订单查询
export const orderDetail = (data) => http({
    url: `/api/order/detail.do`,
    method: "post",
    params: data
})

